import request from '@/utils/request'

// 根据科室ID获取医生列表
export function getDoctorsByDepartmentId(departmentId) {
  return request({
    url: `/api/doctors/department/${departmentId}`,
    method: 'get'
  })
}

// 获取医生详情
export function getDoctorById(id) {
  return request({
    url: `/api/doctors/${id}`,
    method: 'get'
  })
}

// 获取医生排班
export function getDoctorSchedule(doctorId) {
  return request({
    url: `/api/schedules/doctor/${doctorId}`,
    method: 'get'
  })
}

// 创建排班
export function createSchedule(data) {
  return request({
    url: '/api/schedules',
    method: 'post',
    data
  })
}

// 更新排班
export function updateSchedule(data) {
  return request({
    url: `/api/schedules/${data.id}`,
    method: 'put',
    data
  })
} 